HTMLify
app.js
Views: 15 | Author: huxn-webdev
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | const container = document.querySelector(".content"); const baseURL = "https://source.unsplash.com/all/"; const rows = 7; for (let i = 0; i < rows * 3; i++) { const img = document.createElement("img"); img.src = `${baseURL}${randomSize()}`; container.appendChild(img); } function randomSize() { return `${randomNumber()}x${randomNumber()}`; } function randomNumber() { return Math.floor(Math.random() * 10) + 300; } |